<?php 
use \PsiFramework\Classes\Util\UI\Printer;
use \PsiFramework\Classes\Util\UI\HTML;

$identification = $response->getAttribute("identification");
$message = $response->getAttribute("message");
?>
<div id="login">
    <?php
        if ($identification !== null) {
    ?>
    <div id="error"><?php Printer::display($identification->getError()); ?></div>
    <?php 
        }

        if (!isNullOrEmptyString($message)) {
    ?>
    <div id="message"><?php Printer::display($message); ?></div>
    <?php 
        }
    ?>
    <form
        class="editForm"
        action="<?php Printer::display(HTML::linkHref('action=Authenticate'));?>"
        method="post">
        <?php
        if ($response->getAttribute("redirect") != null) {
        ?>
        <input
            type="hidden"
            name="redirect"
            value="<?php Printer::display($response->getAttribute("redirect")); ?>" />
        <?php
        }
        ?>
        <span class="label oblig">
            <span class="titre">
                <?php Printer::display($languageManager->getText("LOGIN_NAME")); ?> :
            </span>
            <input
                type="text"
                name="login"
                id="loginBox"
                value="<?php if ($identification !== null) Printer::display($identification->getLogin());  ?>" />
        </span>
        <span class="label oblig">
            <span class="titre">
                <?php Printer::display($languageManager->getText("PASSWORD")); ?> : 
            </span>
            <input
                type="password"
                name="password"
                id="passwordBox"
                value="" />
        </span>
        <input
            type="submit"
            value="<?php Printer::display($languageManager->getText("SUBMIT")); ?>" />
    </form>
    <br />
    <?php echo HTML::link($languageManager->getText("REGISTER"), "action=Register"); ?>
</div>
